package com.sskj.aikeeper.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.aikeeper.bean.Stock;
import com.sskj.aikeeper.hangqing.activity.ChartFragment;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;

import java.util.List;


/**
 * @author Hey
 * Create at  2019/07/08
 */
public class ChartFragPresenter extends BasePresenter<ChartFragment> {

    public void getStockInfo(String coinGoods, String coinCode) {
        httpService.getStockInfo(coinGoods, coinCode)
                .tag(this)
                .execute(new JsonCallBack<HttpData<List<Stock>>>() {
                    @Override
                    public void onSuccess(Response<HttpData<List<Stock>>> response) {
                        mView.getStockInfoOK(response.body().getData());
                    }
                });
    }
}
